<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.1.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"chenmenghui.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":true,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":false,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="php技术层次 君子不器，先要为器，器中成道   php爱好者 php初学者 php初级程序猿 php中级程序猿 php高级程序猿 服务端技术专家 架构师  基础内容重要性 以基础为前提的面试考察 坚实基础的重要性 保持谦卑之心  常见经典面试题 什么是引用变量 写出三种以上MySQL数据库存储引擎的名称 编写一个在线留言本，实现用户的在线留言功能 请写出常见的排序算法 写出尽可能多的linux命">
<meta property="og:type" content="article">
<meta property="og:title" content="PHP面试">
<meta property="og:url" content="https://chenmenghui.gitee.io/posts/42572.html">
<meta property="og:site_name" content="陈孟辉的学习笔记">
<meta property="og:description" content="php技术层次 君子不器，先要为器，器中成道   php爱好者 php初学者 php初级程序猿 php中级程序猿 php高级程序猿 服务端技术专家 架构师  基础内容重要性 以基础为前提的面试考察 坚实基础的重要性 保持谦卑之心  常见经典面试题 什么是引用变量 写出三种以上MySQL数据库存储引擎的名称 编写一个在线留言本，实现用户的在线留言功能 请写出常见的排序算法 写出尽可能多的linux命">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2018-09-05T16:00:00.000Z">
<meta property="article:modified_time" content="2022-04-15T05:54:45.009Z">
<meta property="article:author" content="陈孟辉">
<meta property="article:tag" content="PHP基础知识">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://chenmenghui.gitee.io/posts/42572.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>PHP面试 | 陈孟辉的学习笔记</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/rss2.xml" title="陈孟辉的学习笔记" type="application/rss+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">陈孟辉的学习笔记</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">加油吧骚年</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-rss">

    <a href="/rss2.xml" rel="section"><i class="fa fa-rss fa-fw"></i>RSS</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://chenmenghui.gitee.io/posts/42572.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="陈孟辉">
      <meta itemprop="description" content="日积月藏，不做咸鱼。这里是陈孟辉的个人学习笔记，现就职于北京瑞友科技，负责维护企业ERP系统。">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="陈孟辉的学习笔记">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          PHP面试
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2018-09-06 00:00:00" itemprop="dateCreated datePublished" datetime="2018-09-06T00:00:00+08:00">2018-09-06</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-04-15 13:54:45" itemprop="dateModified" datetime="2022-04-15T13:54:45+08:00">2022-04-15</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/PHP/" itemprop="url" rel="index"><span itemprop="name">PHP</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/PHP/PHP%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" itemprop="url" rel="index"><span itemprop="name">PHP基础知识</span></a>
                </span>
            </span>

          
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/posts/42572.html#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/posts/42572.html" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>2.9k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>3 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="php技术层次"><a href="#php技术层次" class="headerlink" title="php技术层次"></a>php技术层次</h3><blockquote>
<p>君子不器，先要为器，器中成道</p>
</blockquote>
<ol>
<li>php爱好者</li>
<li>php初学者</li>
<li>php初级程序猿</li>
<li>php中级程序猿</li>
<li>php高级程序猿</li>
<li>服务端技术专家</li>
<li>架构师</li>
</ol>
<h3 id="基础内容"><a href="#基础内容" class="headerlink" title="基础内容"></a>基础内容</h3><h5 id="重要性"><a href="#重要性" class="headerlink" title="重要性"></a>重要性</h5><ul>
<li>以基础为前提的面试考察</li>
<li>坚实基础的重要性</li>
<li>保持谦卑之心</li>
</ul>
<h5 id="常见经典面试题"><a href="#常见经典面试题" class="headerlink" title="常见经典面试题"></a>常见经典面试题</h5><ul>
<li>什么是引用变量</li>
<li>写出三种以上MySQL数据库存储引擎的名称</li>
<li>编写一个在线留言本，实现用户的在线留言功能</li>
<li>请写出常见的排序算法</li>
<li>写出尽可能多的linux命令</li>
<li>写出jquery可以处理ajax的几种方法</li>
<li>谈谈你对MVC的认识，说出几个MVC框架</li>
<li>php如何解决网站大流量与高并发的问题</li>
</ul>
<h5 id="透过现象看本质"><a href="#透过现象看本质" class="headerlink" title="透过现象看本质"></a>透过现象看本质</h5><ol>
<li>解题思路和技巧<ol>
<li>回忆只是点</li>
<li>揣测面试官的考察思路</li>
<li>量的前提是精</li>
</ol>
</li>
</ol>
<h5 id="引用变量考点"><a href="#引用变量考点" class="headerlink" title="引用变量考点"></a>引用变量考点</h5><ul>
<li><p>什么是引用变量？在php中用什么符号标识引用变量</p>
</li>
<li><p>概念：在php中引用意味着用不同的名字访问同一个变量内容</p>
</li>
<li><p>定义方式：‘&amp;’</p>
</li>
<li><p>引用变量的工作原理</p>
</li>
</ul>
<p>题：</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$data</span> = <span class="title function_ invoke__">ranger</span>(<span class="string">&#x27;a&#x27;</span>, <span class="string">&#x27;d&#x27;</span>);</span><br><span class="line"><span class="keyword">foreach</span> (<span class="variable">$data</span> <span class="keyword">as</span> <span class="variable">$key</span> =&gt; <span class="variable">$value</span>) &#123; <span class="comment">// 1</span></span><br><span class="line">    <span class="variable">$value</span> = &amp;<span class="variable">$data</span>[<span class="variable">$key</span>]; <span class="comment">// 2</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="title function_ invoke__">var_dump</span>(<span class="variable">$data</span>);</span><br><span class="line"><span class="comment">// 结果：b,c,d,d</span></span><br></pre></td></tr></table></figure>

<p>不知道怎么解释，借用C语言中的指针便可以很容易理解<br>代码一：<br>$a &#x3D; 1;<br>$b &#x3D; $a;<br>$b &#x3D; 2;<br>echo $a; &#x2F;&#x2F; 1<br>代码二：<br>$a &#x3D; 1;$c &#x3D; 3;<br>$b &#x3D; &amp;$a; &#x2F;&#x2F; $a和$b共用一个指针<br>$b &#x3D; 2;<br>echo $a; &#x2F;&#x2F; 2<br>$b &#x3D; &amp;$c; &#x2F;&#x2F; 修改指针时，只是把$b的指针变了，而$a仍然没有变<br>echo $a; &#x2F;&#x2F; 2</p>
<p>这个时候就可以很容易的理解：<br>$a &#x3D; &amp;$b时，$a和$b的“指针”对应的变量其实是一样的（按址传值）。<br>循环步骤一</p>
<ol>
<li>$key和$value同时被赋值 -&gt; 1</li>
<li>-&gt;2把$data[0]和$value指向了同一内存地址（指针）的变量<br>循环步骤二</li>
<li>$key和$value同时被赋值，但这个时候$value和$data[0]是共用同一个指针的，所以$data[0]现在成了b</li>
<li>-&gt;2 把$value的指针换成了$data[1]的指针<br>循环步骤三<br>重复以上步骤</li>
</ol>
<h5 id="常量和数据类型考察点"><a href="#常量和数据类型考察点" class="headerlink" title="常量和数据类型考察点"></a>常量和数据类型考察点</h5><ul>
<li><p>php的字符串的定义方式及各自区别</p>
<ul>
<li>单引号</li>
<li>双引号</li>
<li>heredoc和nowdoc（类似于双引号和单引号）</li>
</ul>
</li>
<li><p>区别 </p>
<ul>
<li>单引号不能解析变量</li>
<li>单引号不能解析转义字符，之后解析单引号和反斜杠本身</li>
<li>变量和变量、变量和字符串、字符串和字符串之间可以用.链接</li>
</ul>
</li>
<li><p>数据类型</p>
<ul>
<li>三大数据类型：标量、复合、特殊<ul>
<li>标量<ul>
<li>浮点：浮点不能用于相等判断<ul>
<li>0.7 + 0.1 !&#x3D; 0.2 二进制转化有损耗</li>
</ul>
</li>
<li>布尔<ul>
<li>false &#x3D;&#x3D; 0， 0.0， ‘ ‘, ‘0’, false, [], NULL</li>
</ul>
</li>
<li>超全局数组<ul>
<li>$GLOBALS, $_GET, $_POST, $_REQUEST, $_SESSION, $_COOKIE, $_SERVER, $FILES, $_ENV<ul>
<li>$REQUEST &#x3D; $_GET+$POST+$_COOKIE</li>
<li>$_SERVER[‘SERVER_ADDR’], $_SERVER[‘SERVER_NAME’], $_SERVER[‘REQUEST_TIME’], $_SERVER[‘QUERY_STRING’], $_SERVER[‘HTTP_RFERER’], $_SERVER[‘HTTP_USER_AGENT’], $_SREVER[‘REMOTE_ADDR’], $_SERVER[‘REQUEST_URI], $_SERVER[‘PATH_INFO’]</li>
</ul>
</li>
</ul>
</li>
<li>NULL<ul>
<li>直接赋值null</li>
<li>未定义</li>
<li>unset</li>
</ul>
</li>
<li>常量<ul>
<li><p>const（语言结构，更快）、define（函数）</p>
</li>
<li><p>const可以定义类常量而define不能</p>
</li>
<li><p>常量一径定义，不能修改也不能删除</p>
</li>
<li><p>预定义常量</p>
<ul>
<li><strong>FILE</strong>, <strong>LINE</strong>, <strong>DIR</strong>, <strong>FUNCTION</strong>, <strong>CLASS</strong>, <strong>TRAIT</strong>, <strong>METHOD</strong>, <strong>NAMESPACE</strong></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p>解题方法</p>
<ul>
<li>把总结的点进行梳理和复习，牢记</li>
</ul>
</li>
</ul>
<h1 id="运算符考点"><a href="#运算符考点" class="headerlink" title="运算符考点"></a>运算符考点</h1><h2 id="运算符的优先级"><a href="#运算符的优先级" class="headerlink" title="运算符的优先级"></a>运算符的优先级</h2><p>递增递减&gt;！&gt;算术运算符&gt;大小比较&gt;（不）相等比较&gt;引用&gt;位运算符（^）&gt;位运算符（|）&gt;逻辑与&gt;逻辑或&gt;三目&gt;赋值&gt;and&gt;xor&gt;or</p>
<h3 id="延伸考点"><a href="#延伸考点" class="headerlink" title="延伸考点"></a>延伸考点</h3><ul>
<li><p>&#x3D;&#x3D;和&#x3D;&#x3D;&#x3D;</p>
</li>
<li><p>递增递减不会影响布尔值， false– &#x3D;&#x3D; false</p>
</li>
<li><p>递减Null没有效果，Null – &#x3D;&#x3D;&#x3D; Null</p>
</li>
<li><p>Null++ &#x3D;&#x3D; 1</p>
</li>
<li><p>++1和1++</p>
</li>
<li><p>短路作用</p>
</li>
<li><p>|| &amp;&amp; and or</p>
<ul>
<li>$a &#x3D; false|| true; &#x2F;&#x2F; true    ||的优先级大于&#x3D;</li>
<li>$a &#x3D; false or true; &#x2F;&#x2F; false or的优先级低于&#x3D;</li>
</ul>
</li>
</ul>
<h2 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h2><p>重点记忆<strong>递增&#x2F;递减</strong>运算符的运算规则，逻辑运算符的短路效果，在看到逻辑运算符要多考虑优先级问题</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$a</span> = <span class="number">0</span>;<span class="variable">$b</span> = <span class="number">0</span>;</span><br><span class="line"><span class="keyword">if</span> (<span class="variable">$a</span> = <span class="number">3</span> &gt; <span class="number">0</span> || <span class="variable">$b</span> = <span class="number">3</span> &gt; <span class="number">0</span>) &#123; <span class="comment">// $a = ((3&gt;0) || ($b = 3 &gt; 0))</span></span><br><span class="line">    <span class="variable">$a</span>++;</span><br><span class="line">    <span class="variable">$b</span>++;</span><br><span class="line">    <span class="title function_ invoke__">var_dump</span>(<span class="variable">$a</span>);</span><br><span class="line">    <span class="title function_ invoke__">var_dump</span>(<span class="variable">$b</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// $a ==== true;$b === 1;</span></span><br></pre></td></tr></table></figure>

<h1 id="流程控制"><a href="#流程控制" class="headerlink" title="流程控制"></a>流程控制</h1><h2 id="真题"><a href="#真题" class="headerlink" title="真题"></a>真题</h2><h3 id="请列出php遍历php数组的三种方式及各种区别"><a href="#请列出php遍历php数组的三种方式及各种区别" class="headerlink" title="请列出php遍历php数组的三种方式及各种区别"></a>请列出php遍历php数组的三种方式及各种区别</h3><p>延伸：分支控制</p>
<ol>
<li>for</li>
<li>foreach</li>
<li>while list() each() 组合</li>
</ol>
<table>
<thead>
<tr>
<th>类别</th>
<th>区别</th>
</tr>
</thead>
<tbody><tr>
<td>for</td>
<td>只能遍历索引数组</td>
</tr>
<tr>
<td>foreach</td>
<td>可以遍历索引和关联数组,会reset()<br>先重置指针,后遍历</td>
</tr>
<tr>
<td>while组合</td>
<td>可以遍历索引和关联数组,不会reset()</td>
</tr>
</tbody></table>
<h3 id="分支控制"><a href="#分支控制" class="headerlink" title="分支控制"></a>分支控制</h3><p>if…elseif</p>
<p>使用elseif有一个基本原则,把优先范围小的条件放在前面处理</p>
<p>switch…case</p>
<ol>
<li>和if不同的是,switch后面的控制表达式的数据类型只能是整形,浮点型或字符串</li>
<li>continue语句作用到switch的作用类似于break,跳出switch外的循环,可以使用coutinue 2</li>
<li>会生成跳转表,直接跳转到对应的case<br>效率:如果条件比一个简单的比较要复杂的多或者在一个很多次的循环中,那么用switch语句可能会快些</li>
</ol>
<h2 id="真题-1"><a href="#真题-1" class="headerlink" title="真题"></a>真题</h2><h3 id="php中如何优化多个if…else语句的情况"><a href="#php中如何优化多个if…else语句的情况" class="headerlink" title="php中如何优化多个if…else语句的情况?"></a>php中如何优化多个if…else语句的情况?</h3><ol>
<li>把出现几率较大的条件往前挪</li>
<li>如果判断的条件比较复杂且其值是整形,浮点型或字符串,可以使用switch</li>
</ol>
<h1 id="自定义函数及内部函数的考点"><a href="#自定义函数及内部函数的考点" class="headerlink" title="自定义函数及内部函数的考点"></a>自定义函数及内部函数的考点</h1><h2 id="真题-2"><a href="#真题-2" class="headerlink" title="真题"></a>真题</h2><h1 id="常见框架的特性考点"><a href="#常见框架的特性考点" class="headerlink" title="常见框架的特性考点"></a>常见框架的特性考点</h1><h2 id="真题-3"><a href="#真题-3" class="headerlink" title="真题"></a>真题</h2><h3 id="php框架有哪些"><a href="#php框架有哪些" class="headerlink" title="php框架有哪些,"></a>php框架有哪些,</h3><p>php框架的差异和优缺点</p>
<ol>
<li>Yaf框架<ul>
<li>Yaf使用php扩展的形式写的一个框架,也就是以C语言为底层编写的,性能要比php代码写的框架要快一个数量级</li>
<li>优点:执行效率高,轻量级框架,可扩展性强</li>
<li>缺点:高版本兼容性差,底层代码可读性差,需要安装扩展,功能单一,开发需要编写大量的插件</li>
</ul>
</li>
<li>Yii2框架<ul>
<li>Yii2是一款非常优秀的通用web后端框架结构简单优雅,实用功能丰富,扩展性强,性能高是她最突出的优点</li>
<li>缺点:学习成本较高,相比Yaf很重</li>
</ul>
</li>
</ol>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/PHP%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" rel="tag"># PHP基础知识</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item"></div>
      <div class="post-nav-item">
    <a href="/posts/30908.html" rel="next" title="PHP基础知识之自定义函数和内部函数">
      PHP基础知识之自定义函数和内部函数 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#php%E6%8A%80%E6%9C%AF%E5%B1%82%E6%AC%A1"><span class="nav-number">1.</span> <span class="nav-text">php技术层次</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9F%BA%E7%A1%80%E5%86%85%E5%AE%B9"><span class="nav-number">2.</span> <span class="nav-text">基础内容</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%87%8D%E8%A6%81%E6%80%A7"><span class="nav-number">2.0.1.</span> <span class="nav-text">重要性</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E5%B8%B8%E8%A7%81%E7%BB%8F%E5%85%B8%E9%9D%A2%E8%AF%95%E9%A2%98"><span class="nav-number">2.0.2.</span> <span class="nav-text">常见经典面试题</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%80%8F%E8%BF%87%E7%8E%B0%E8%B1%A1%E7%9C%8B%E6%9C%AC%E8%B4%A8"><span class="nav-number">2.0.3.</span> <span class="nav-text">透过现象看本质</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E5%BC%95%E7%94%A8%E5%8F%98%E9%87%8F%E8%80%83%E7%82%B9"><span class="nav-number">2.0.4.</span> <span class="nav-text">引用变量考点</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E5%B8%B8%E9%87%8F%E5%92%8C%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E8%80%83%E5%AF%9F%E7%82%B9"><span class="nav-number">2.0.5.</span> <span class="nav-text">常量和数据类型考察点</span></a></li></ol></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E8%BF%90%E7%AE%97%E7%AC%A6%E8%80%83%E7%82%B9"><span class="nav-number"></span> <span class="nav-text">运算符考点</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%BF%90%E7%AE%97%E7%AC%A6%E7%9A%84%E4%BC%98%E5%85%88%E7%BA%A7"><span class="nav-number"></span> <span class="nav-text">运算符的优先级</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%BB%B6%E4%BC%B8%E8%80%83%E7%82%B9"><span class="nav-number">1.</span> <span class="nav-text">延伸考点</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B3%A8%E6%84%8F"><span class="nav-number"></span> <span class="nav-text">注意</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%B5%81%E7%A8%8B%E6%8E%A7%E5%88%B6"><span class="nav-number"></span> <span class="nav-text">流程控制</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9C%9F%E9%A2%98"><span class="nav-number"></span> <span class="nav-text">真题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%AF%B7%E5%88%97%E5%87%BAphp%E9%81%8D%E5%8E%86php%E6%95%B0%E7%BB%84%E7%9A%84%E4%B8%89%E7%A7%8D%E6%96%B9%E5%BC%8F%E5%8F%8A%E5%90%84%E7%A7%8D%E5%8C%BA%E5%88%AB"><span class="nav-number">1.</span> <span class="nav-text">请列出php遍历php数组的三种方式及各种区别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%88%86%E6%94%AF%E6%8E%A7%E5%88%B6"><span class="nav-number">2.</span> <span class="nav-text">分支控制</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9C%9F%E9%A2%98-1"><span class="nav-number"></span> <span class="nav-text">真题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#php%E4%B8%AD%E5%A6%82%E4%BD%95%E4%BC%98%E5%8C%96%E5%A4%9A%E4%B8%AAif%E2%80%A6else%E8%AF%AD%E5%8F%A5%E7%9A%84%E6%83%85%E5%86%B5"><span class="nav-number">1.</span> <span class="nav-text">php中如何优化多个if…else语句的情况?</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0%E5%8F%8A%E5%86%85%E9%83%A8%E5%87%BD%E6%95%B0%E7%9A%84%E8%80%83%E7%82%B9"><span class="nav-number"></span> <span class="nav-text">自定义函数及内部函数的考点</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9C%9F%E9%A2%98-2"><span class="nav-number"></span> <span class="nav-text">真题</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%B8%B8%E8%A7%81%E6%A1%86%E6%9E%B6%E7%9A%84%E7%89%B9%E6%80%A7%E8%80%83%E7%82%B9"><span class="nav-number"></span> <span class="nav-text">常见框架的特性考点</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9C%9F%E9%A2%98-3"><span class="nav-number"></span> <span class="nav-text">真题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#php%E6%A1%86%E6%9E%B6%E6%9C%89%E5%93%AA%E4%BA%9B"><span class="nav-number">1.</span> <span class="nav-text">php框架有哪些,</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">陈孟辉</p>
  <div class="site-description" itemprop="description">日积月藏，不做咸鱼。这里是陈孟辉的个人学习笔记，现就职于北京瑞友科技，负责维护企业ERP系统。</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">170</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">45</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">60</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title"><i class="fa fa-link fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="http://tool.oschina.net/uploads/apidocs/jquery/regexp.html" title="http:&#x2F;&#x2F;tool.oschina.net&#x2F;uploads&#x2F;apidocs&#x2F;jquery&#x2F;regexp.html" rel="noopener" target="_blank">正则表达式</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.cs.usfca.edu/~galles/visualization/Algorithms.html" title="https:&#x2F;&#x2F;www.cs.usfca.edu&#x2F;~galles&#x2F;visualization&#x2F;Algorithms.html" rel="noopener" target="_blank">算法图示</a>
        </li>
    </ul>
  </div>

      </div>
        <div class="back-to-top motion-element">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">陈孟辉</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">204k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:06</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>

<script src="/js/utils.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : true,
      notify     : true,
      appId      : '9jQqXQuURk2dvsv5oVh9D0VM-gzGzoHsz',
      appKey     : 'YfjrSNHQAtj63yeNmdmrLlLw',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : false,
      lang       : '' || 'zh-cn',
      path       : location.pathname,
      recordIP   : true,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
